package com.lidong.doc;

import com.lidong.pojo.Product;
import lombok.Data;
import lombok.NoArgsConstructor;


@Data
@NoArgsConstructor
public class ProductDoc extends Product {


    private String all;

    public ProductDoc(Product product) {
       super(product.getProductId(),product.getProductName(),product.getCategoryId(),
               product.getProductTitle(),product.getProductIntro(),product.getProductPicture(),
               product.getProductPrice(),product.getProductSellingPrice(),product.getProductNum(),
               product.getProductSales());

       this.all = product.getProductName()+product.getProductTitle()+product.getProductIntro();
    }
}
